﻿package com.sz.common.query;

public class QueryWrapper {
	
	public static String wrapQuery(String sql, String begin, String end) {
		StringBuffer buf = new StringBuffer();
		buf.append("select * from (select rownum rno__, t.* from (");
		buf.append(sql);
		buf.append(String.format(")t) where rno__ >= %s  and rno__ <= %s", begin, end));		
		return buf.toString();
	}

}
